package br.com.werp.suporte.Relatorios;
import java.util.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;

/**
 * Creation Date 10/12/2004 16:42:28
 * Last Modify Date 17/10/2006 11:17:10
 */

public class AuditoriaActionForm extends org.apache.struts.action.ActionForm {
  public String audt_id;
  public String usur_login;
  public String audt_operacao;
  public String audt_recurso;
  public String daud_campo;
  public String daud_campo_valor;
  public String dtInicio;
  public String dtFinal;
  public String tpSaida;
  private boolean valida = false;
  public AuditoriaActionForm() {
  }
  /**
    * AUDT_ID: Gets the value of this field.
    */
  public String getAudt_id() {
    return audt_id;
  }
  /**
     * AUDT_ID: Sets thhe value for this field.
     */
  public void setAudt_id(String AUDT_ID) {
    audt_id = AUDT_ID;
  }
  /**
    * USUR_LOGIN: Gets the value of this field.
    */
  public String getUsur_login() {
    return usur_login;
  }
  /**
     * USUR_LOGIN: Sets thhe value for this field.
     */
  public void setUsur_login(String USUR_LOGIN) {
    usur_login = USUR_LOGIN;
  }
  /**
    * AUDT_OPERACAO: Gets the value of this field.
    */
  public String getAudt_operacao() {
    return audt_operacao;
  }
  /**
     * AUDT_OPERACAO: Sets thhe value for this field.
     */
  public void setAudt_operacao(String AUDT_OPERACAO) {
    audt_operacao = AUDT_OPERACAO;
  }
  private Vector audt_operacaoList = new Vector(10, 10);
  public java.util.Vector getAudt_operacaoList() {
    audt_operacaoList = new Vector(10, 10);
    audt_operacaoLabelList = new Vector(10, 10);
    audt_operacaoList.addElement("");
    java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("ApplicationResources");
    audt_operacaoLabelList.addElement(bundle.getString("jsp.pleaseselect"));
    com.egen.util.jdbc.JdbcUtil j = null;
    try {
      j = new com.egen.util.jdbc.JdbcUtil();
      br.com.werp.suporte.dbobj.table.Tipo_operacao db_object =
        new br.com.werp.suporte.dbobj.table.Tipo_operacao();
      String[][] select = null;
      Object[][] where = null;
      String[] order = {"tope_descricao"};
      String[] groupby = null;
      String[] having = null;
      Vector results =
        j.select(db_object, select, where, groupby, having, order);
      for (int i = 0; i < results.size(); i++) {
        db_object = (br.com.werp.suporte.dbobj.table.Tipo_operacao)
            results.elementAt(i);
        audt_operacaoList.addElement(""+db_object.getTope_id());
        audt_operacaoLabelList.addElement(""+
            db_object.getTope_descricao());
      }
    } catch (Exception e) {
      e.printStackTrace(System.out);
    }
    finally { if (j != null) {
          j.close();
        }
            } java.util.Vector list = audt_operacaoList;
    return list;
  }
  private java.util.Vector audt_operacaoLabelList = new Vector(10, 10);
  public java.util.Vector getAudt_operacaoLabelList() {
    java.util.Vector list = audt_operacaoLabelList;
    return list;
  }
  /**
    * AUDT_RECURSO: Gets the value of this field.
    */
  public String getAudt_recurso() {
    return audt_recurso;
  }
  /**
     * AUDT_RECURSO: Sets thhe value for this field.
     */
  public void setAudt_recurso(String AUDT_RECURSO) {
    audt_recurso = AUDT_RECURSO;
  }
  /**
    * DAUD_CAMPO: Gets the value of this field.
    */
  public String getDaud_campo() {
    return daud_campo;
  }
  /**
     * DAUD_CAMPO: Sets thhe value for this field.
     */
  public void setDaud_campo(String DAUD_CAMPO) {
    daud_campo = DAUD_CAMPO;
  }
  /**
    * DAUD_CAMPO_VALOR: Gets the value of this field.
    */
  public String getDaud_campo_valor() {
    return daud_campo_valor;
  }
  /**
     * DAUD_CAMPO_VALOR: Sets thhe value for this field.
     */
  public void setDaud_campo_valor(String DAUD_CAMPO_VALOR) {
    daud_campo_valor = DAUD_CAMPO_VALOR;
  }
  /**
    * DTINICIO: Gets the value of this field.
    */
  public String getDtInicio() {
    return dtInicio;
  }
  /**
     * DTINICIO: Sets thhe value for this field.
     */
  public void setDtInicio(String DTINICIO) {
    dtInicio = DTINICIO;
  }
  /**
    * DTFINAL: Gets the value of this field.
    */
  public String getDtFinal() {
    return dtFinal;
  }
  /**
     * DTFINAL: Sets thhe value for this field.
     */
  public void setDtFinal(String DTFINAL) {
    dtFinal = DTFINAL;
  }
  /**
    * TPSAIDA: Gets the value of this field.
    */
  public String getTpSaida() {
    return tpSaida;
  }
  /**
     * TPSAIDA: Sets thhe value for this field.
     */
  public void setTpSaida(String TPSAIDA) {
    tpSaida = TPSAIDA;
  }
  /**
    * Reset all fields.
    */
  public void reset(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    audt_id = null;
    usur_login = null;
    audt_operacao = null;
    audt_recurso = null;
    daud_campo = null;
    daud_campo_valor = null;
    dtInicio = null;
    dtFinal = null;
    tpSaida = null;
  }
  /**
    * Validate fields and return ActionErrors.
    */

  public ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    valida = false;
    if (com.egen.util.text.Validate.isValidate("gerarRelatorio_action,",
        request)) {






      if (com.egen.util.text.Validate.isNull(dtInicio)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","Data Inicial",
                "dtInicio", "0"));
      }
      if (!com.egen.util.text.Validate.isMaxlength(dtInicio, 10)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.maxlength","Data Inicial",
                "dtInicio", "10","0"));
      }
      if (!com.egen.util.text.Validate.isMaxlength(dtFinal, 10)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.maxlength","Data Final",
                "dtFinal","10", "0"));
      }

    }
    if (errors != null && errors.size() > 0) {
      javax.servlet.http.HttpSession session = request.getSession(true);
      ActionForward actionForward = null;
      session.setAttribute(mapping.getName(), this);
    }
    return errors;
  }
}
